package com.luckymore.ydd.app.util;

import com.base.exception.IMError;

/**
 * Created by yjh on 15-3-12.
 */
public enum MErrors implements IMError {
    EMPTY(0, ""),
    NO_NET(99, "请确认您的网络连接是否正常"),
    NET_BAD(100, "当前网络环境较差"),
    DOWNLOAD_FAIL(104, "下载失败"),
    NO_IMG(102, "请先设置图片"),
    NO_WIFI(101, "使用2G/3G/4G网络"),
    DOWNLOADING(105, "正在下载，请稍后"),
    UPLOADING_IMGAGE(103, "头像尚未上传完成"),
    PHONE_EMPTY(10000, "手机号不能为空"),
    PHONE_FORMAT_ERROR(10001, "手机号格式不正确"),
    VERIFY_EMPTY(10002, "验证码不能为空"),
    VERIFY_FORMAT_ERROR(10003, "验证码格式不正确"),
    PASSWD_EMPTY(10004, "密码不能空"),
    PASSWD_FORMAT_ERROR(10005, "密码应为4-20位数字、字母等"),
    NICKNAME_EMPTY(10006, "昵称不能空"),
    NICKNAME_FORMAT_ERROR(10007, "昵称长度应为1-10"),
    VERIFY_ERROR(10008, "验证码错误"),
    VERIFY_ERROR_HINT(10009, "请仔细核对验证码，重新输入"),
    COURSENAME_EMPTY(100010, "课程名称不能为空"),
    EMAIL_EMPTY(10011, "邮箱地址不能为空"),
    EMAIL_FORMAT_ERROR(10012, "邮箱格式不正确"),
    CONTENT_EMPTY(10013, "内容不能为空"),
    CONTENT_FORMAT_ERROR(10014, "内容不能超过300字"),
    CONTACT_METHOD_EMPTY(10015, "联系方式不能为空"),
    CONTACT_METHOD_FORMAT_ERROR(10016, "联系方式格式不正确"),
    COURSENAME_FORMAT_ERROR(10017, "课程名称不能超过12个字符"),
    ACCOUNT_EMPTY(10018, "登录账号不能为空"),
    ACCOUNT_FORMAT_ERROR(10019, "登录账号格式不正确"),
    SEARCH_KEY_EMPTY(10020, "搜索内容不能为空"),
    SEARCH_KEY_FORMAT_ERROR(10021, "搜索内容不能超过50个字");

    private int code;
    private String msg;

    MErrors(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public String getMsg() {
        return msg;
    }

    @Override
    public String toString() {
        return msg;
    }
}
